<?php
include("../../tools/session.php");
include("../../tools/controls.php");
include("../../conf.php");
include("../../tools/pub.php");

// 如果登录失败、无权限访问，那么采取相应措施
if (!($is_login_success === true)) { session_hop_page("../index.php"); exit(); }
if (!power_check(0)) { include("tpl-inc-wp.php"); $tpl->display($oa_tpl_path . "/no-power.html"); exit(); }

/*-- 以下是实际内容 --*/
$page_status = $_POST["page_status"];
if (!$page_status)
{
	include("tpl-inc-wp.php");
	$tpl->display($oa_tpl_path . "/default/view_document.html");
}
// 显示 XML
elseif ($page_status == 1)
{
	include("../../tools/mysql.php");
	db_connect();
	
	header("content-type: text/xml");
	echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
	
}
?>
